home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UTIL / SCREEN / CURSES01 / minix / c / endwin < prev    next >
Text File  |  1992-02-29  |  2KB  |  46 lines

  1. /****************************************************************/
  2. /* Endwin() routine of the PCcurses package            */
  3. /*                                */
  4. /****************************************************************/
  5. /* This version of curses is based on ncurses, a curses version    */
  6. /* originally written by Pavel Curtis at Cornell University.    */
  7. /* I have made substantial changes to make it run on IBM PC's,    */
  8. /* and therefore consider myself free to make it public domain.    */
  9. /*        Bjorn Larsson (...mcvax!enea!infovax!bl)    */
  10. /****************************************************************/
  11. /* 1.0:    Release:                    870515    */
  12. /****************************************************************/
  13. /* Modified to run under the MINIX operating system by Don Cope */
  14. /* These changes are also released into the public domain.      */
  15. /*                             900906  */
  16. /****************************************************************/
  17.  
  18. #include <curses.h>
  19. #include "curspriv.h"
  20.  
  21. /****************************************************************/
  22. /* Endwin() does neccessary clean-up after using the PCcurses    */
  23. /* package. It should be called before exiting the user's pro-    */
  24. /* gram.                            */
  25. /****************************************************************/
  26.  
  27. #ifdef TERMIO
  28. #include "termio.h"
  29. extern struct termio _cursoldtty;
  30. #endif
  31.  
  32. int endwin()
  33.   {
  34.   delwin(stdscr);
  35.   delwin(curscr);
  36.   delwin(_cursvar.tmpwin);
  37.   curson();                /* turn on cursor if off */
  38.   _cursescursor(0,LINES-1, 0);        /* put at lower left */
  39.   _cursesscb(_cursvar.orgcbr);        /* restore original ^BREAK setting */
  40.   _cursesdef();
  41. #ifdef TERMIO
  42.   ioctl(0,TCSETA,&_cursoldtty);
  43. #endif
  44.   return(OK);
  45.   } /* endwin */
  46.